home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
disk
/
wastre12.zip
/
WASTREE.DOC
< prev
next >
Wrap
Text File
|
1997-04-05
|
9KB
|
172 lines
WasTree Ver. 1.2_______
Purpose: Measure disk space used and wasted by directories and directory
trees, and show what the figures would be if the directories were
located on other disks with other cluster sizes.
Format: WASTREE [d:]path /D /V
d: = drive letter
path = directory to start from
/D = measure only the directory given,
ignoring any subdirectories.
/V = "verbose" listing of all directories
examined.
Since WasTree writes to standard output, you can redirect its out-
put to the printer or to a file:
WASTREE C:\BIN /D > PRN or filename
Remarks: When DOS stores a file on disk, it assigns to it a certain number
of clusters or "allocation units" of disk space. If, as usually
happens, the file does not exactly fill the clusters assigned,
some space in the last assigned cluster is not actually occupied
by the file data.
The size of these clusters depends on the size of the disk. A DOS
disk can keep track of only so many clusters, so the larger the
disk, the larger the clusters have to be. In consequence, the
larger the disk the more space it is likely to waste in those end
clusters. So, you can usually reduce the waste by partitioning a
big disk into several small ones. There are programs which give
you information about wastage on your disk, intended to help you
decide how to partition it. They show how much space your present
disk wastes, and how much would be wasted if you re-partitioned it
in various ways. They do not need to show what's happening in
anything smaller than the whole disk.
WasTree is intended to help with a less substantial decision. You
might save a little space by moving directories from one disk to
another. For this purpose, you need to know what's happening in
various subdirectories and directory trees, and what would happen
to them on disks with different cluster sizes. To this end,
WasTree will give you reports on a single directory, on a direc-
tory tree, or on a whole disk. Here are three samples, showing
the command which produced them and the display it produced:
WasTree Page 2_______
C:\>D:\FWN /D <Report on a single directory>
We found 96 files in D:\FWN
The files actually contain 1,568,281 bytes of data.
Cluster Bytes Used Bytes Wasted
Size Total Total Percent
============================================================
512 1,591,296 23,015 1.4%
1,024 1,625,088 56,807 3.5%
2,048 1,687,552 119,271 7.1%
4,096 1,839,104 270,823 14.7%
This Disk => 8,192 2,162,688 594,407 27.5% <=
16,384 2,834,432 1,266,151 44.7%
32,768 4,194,304 2,626,023 62.6%
65,536 6,946,816 5,378,535 77.4%
============================================================
WasTree 1.0 fecit R. N. Wisan, March, 1997
C:\>WASTREE D:\FWN <Report on a directory tree>
Starting with: D:\FWN
We found 476 files in D:\FWN and its 13 subdirectories.
The files actually contain 7,906,212 bytes of data.
(We haven't counted bytes in the directories themselves.)
Cluster Bytes Used Bytes Wasted
Size Total Total Percent
============================================================
512 8,031,744 125,532 1.6%
1,024 8,143,872 237,660 2.9%
2,048 8,480,768 574,556 6.8%
4,096 9,007,104 1,100,892 12.2%
This Disk => 8,192 10,420,224 2,514,012 24.1% <=
16,384 12,828,672 4,922,460 38.4%
32,768 20,021,248 12,115,036 60.5%
65,536 34,471,936 26,565,724 77.1%
============================================================
WasTree 1.0 fecit R. N. Wisan, March, 1997
WasTree Page 3_______
C:\>WASTREE D:\ <Report on a whole disk>
Starting with: D:\
We found 4,176 files in D:\ and its 180 subdirectories.
The files actually contain 132,654,031 bytes of data.
(We haven't counted bytes in the directories themselves.)
Cluster Bytes Used Bytes Wasted
Size Total Total Percent
============================================================
512 133,626,368 972,337 0.7%
1,024 134,768,640 2,114,609 1.6%
2,048 137,326,592 4,672,561 3.4%
4,096 142,839,808 10,185,777 7.1%
This Disk => 8,192 155,615,232 22,961,201 14.8% <=
16,384 181,747,712 49,093,681 27.0%
32,768 240,582,656 107,928,625 44.9%
65,536 365,559,808 232,905,777 63.7%
============================================================
WasTree 1.0 fecit R. N. Wisan, March, 1997
The "This Disk" arrow points to the actual cluster size, bytes
used and bytes wasted. The other lines show what would be used
and wasted if the files found were located on disks which used
clusters of other sizes. That's what gives you the basis for
deciding whether to move the directory or tree to a different
disk.
Disk Sizes: Cluster size varies with the size of the disk:
Disk Size Bytes/Cluster
--------- -------------
most floppies 512
320K/360K floppies 1,024
Hard disks <128MB 2,048
128MB to <256MB 4,096
256MB to <512MB 8,192
512MB to <1GB 16,384
1GB to <2GB 32,768
2GB to <4GB 65,536
As a general rule, the smaller the files, the more efficient small
clusters will be, so you want to put small files on small disks
and large files on large disks. Naturally, directory-fuls won't
sort themselves out so neatly, and that's why you use WasTree.
Either it will show you where to put the trees and directories for
greatest efficiency, or it'll convince you that it doesn't matter.
WasTree Page 4_______
Legal Info:
Copyright (C) 1997 by R. N. Wisan.
WasTree is freeware. You may use and distribute this pretty much
as you please, provided that:
- You keep the program and this documentation together.
- You don't hack the program --don't change it in any way.
- You don't try to prevent others from using and distributing
it.
I can't guarantee that this program is harmless or even accurate,
and I can't promise to fix whatever is wrong with it, but I'd
appreciate bug reports and suggestions.
Enjoy,
History:
1.0 Original Issue (March 1997)
1.1 Cosmetic: fix spacing for Pct Wasted in display. (Mar 97)
1.2 Bugfix: under Win95 and certain other systems, WasTree was
unable to find directories.
R. N. Wisan, April 1997
WISANR@hartwick.edu
37 Clinton St, Oneonta, NY 13820, USA